package com.vae.search.feign;

import com.vae.mall.common.response.RespResult;
import com.vae.search.model.SpuEs;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * es  spu搜索feign
 */
@FeignClient(contextId = "spuSearchFeign",value = "search-service")
public interface SpuSearchFeign {

    /****
     * 单个spu导入
     * @param spuEs
     * @return
     */
    @PostMapping(value = "/search/spues/add")
    RespResult add(@RequestBody SpuEs spuEs);

    /***
     * 根据ID删除spu
     * @param id
     * @return
     */
    @DeleteMapping(value = "/search/spues/del/{id}")
    RespResult del(@PathVariable("id")String id);
}
